<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the normalized HSL color of the ImagickPixel object</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagickpixel.getcolorvalue.html">ImagickPixel::getColorValue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagickpixel.ispixelsimilar.html">ImagickPixel::isPixelSimilar</a></div>
 <div class="up"><a href="class.imagickpixel.html">ImagickPixel</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="imagickpixel.gethsl" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ImagickPixel::getHSL</h1>
  <p class="verinfo">(PECL imagick 2.0.0)</p><p class="refpurpose"><span class="refname">ImagickPixel::getHSL</span> &mdash; <span class="dc-title">Returns the normalized HSL color of the ImagickPixel object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagickpixel.gethsl-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>ImagickPixel::getHSL</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Returns the normalized HSL color described by the ImagickPixel object,
   with each of the three values as floating point numbers between 0.0
   and 1.0.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagickpixel.gethsl-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the HSL value in an array with the keys &quot;hue&quot;,
   &quot;saturation&quot;, and &quot;luminosity&quot;. Throws ImagickPixelException on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagickpixel.gethsl-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3258">
    <p><strong>Example #1 Basic <span class="function"><strong>Imagick::getHSL()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$color&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">ImagickPixel</span><span style="color: #007700">(</span><span style="color: #DD0000">'rgb(90%,&nbsp;10%,&nbsp;10%)'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$colorInfo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$color</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getHSL</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$colorInfo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [hue] =&gt; 0
    [saturation] =&gt; 0.80001220740379
    [luminosity] =&gt; 0.50000762951095
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-imagickpixel.gethsl-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Available with ImageMagick library version 6.2.9 and higher.
   </p>
  </p></blockquote>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagickpixel.getcolorvalue.html">ImagickPixel::getColorValue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagickpixel.ispixelsimilar.html">ImagickPixel::isPixelSimilar</a></div>
 <div class="up"><a href="class.imagickpixel.html">ImagickPixel</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
